using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class forums_controls_usercp_EditSettingsl : Controls.DataManagerUserControl
{
    protected override void ItemChanged()
    {
        if (CurrentUser != null)
        {
            mviewSettings.SetActiveView(viewSettings);
            chkAvatars.Checked = CurrentUser.UserSettings.ShowUserAvatars;
            chkSignatures.Checked = CurrentUser.UserSettings.ShowUserSignatures;
            Page.Title = "FSTDT Forums: " + "Edit Settings";
        }
        else
        {
            mviewSettings.SetActiveView(viewError);
            Page.Title = "FSTDT Forums: " + "Oops!";
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnSave_Click(object sender, EventArgs e)
    {
        CurrentUser.UserSettings.ShowUserAvatars = chkAvatars.Checked;
        CurrentUser.UserSettings.ShowUserSignatures = chkSignatures.Checked;
        DAL.Users.Save(CurrentUser);
    }
}
